Fix LocalRepo::findFiles and 'time' option
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 17 Jan 2014 16:42:01 +0000 (11:42 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 17 Jan 2014 16:43:22 +0000 (11:43 -0500)
It's looking in the wrong place for the 'time' option so it never
actually queries for the old revisions.

Change-Id: Ifcb626fb27f8b602ff37cf33d4c66c4fc2fd3d56

includes/filerepo/LocalRepo.php

index c5346aa..1399c2b 100644 (file)
@@ -315,11 +315,11 @@ class LocalRepo extends FileRepo {
                // Query old image table
                $oiConds = array(); // WHERE clause array for each file
                foreach ( $searchSet as $dbKey => $search ) {
-                       if ( isset( $search['params']['time'] ) ) {
+                       if ( isset( $search['time'] ) ) {
                                $oiConds[] = $dbr->makeList(
                                        array(
                                                'oi_name' => $this->getNameFromTitle( File::normalizeTitle( $dbKey ) ),
-                                               'oi_timestamp' => $dbr->timestamp( $search['params']['time'] )
+                                               'oi_timestamp' => $dbr->timestamp( $search['time'] )
                                        ),
                                        LIST_AND
                                );